package com.bng8.majunzhu.system.provider;

import com.bng8.majunzhu.system.entity.Config;
import com.bng8.majunzhu.system.entity.SysConfig;
import com.bng8.majunzhu.system.mapper.SysConfigMapper;
import com.bng8.majunzhu.system.service.ConfigService;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class SysConfigProvider extends ServiceImpl<SysConfigMapper, SysConfig> implements ConfigService {

    @Resource
    private SysConfigMapper configMapper;

    @Override
    public List<Config> getAll() {
        List<SysConfig> sysConfigs = configMapper.selectAll();
        return new ArrayList<>(sysConfigs);
    }
}
